package com.restaurant.controller;

import com.restaurant.client.ProductRecordClient;
import com.restaurant.client.TaskRecordContractClient;
import com.restaurant.client.TransportRecordContractClient;
import com.restaurant.dto.user.UserLoginDTO;
import com.restaurant.entity.Product;
import com.restaurant.entity.ProductRecord;
import com.restaurant.result.Result;
import com.restaurant.service.*;
import com.restaurant.service.material.ProduceRecordService;
import com.restaurant.service.material.ProductService;
import com.restaurant.service.transport.TransportRecordService;
import com.restaurant.vo.user.UserLoginVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.time.LocalDateTime;

@Slf4j
@RestController
@RequestMapping("/test")
public class testController {

    @Resource
    private ProductService productService;
    @Resource
    private ProduceRecordService productRecordService;
    @Resource
    private StockService stockService;
    @Resource
    private UserService userService;
    @Resource
    private CompanyService companyService;
    @Resource
    private GoodService goodService;
    @Resource
    private TransportRecordService transportRecordService;
    @Resource
    private TaskService taskService;
    @Resource
    private TaskRecordService taskRecordService;
    @Autowired
    private ProductRecordClient productRecordClient;
    @Autowired
    private TransportRecordContractClient transportRecordContractClient;
    @Autowired
    private TaskRecordContractClient taskRecordContractClient;

    @GetMapping("/1")
    public Result<Void> login() {
        ProductRecord productRecord = new ProductRecord(
                1L,
                11L,
                1001L,
                "25°C",
                "Sufficient",
                "/path/to/picture.jpg",
                "Sufficient",
                "Healthy",
                LocalDateTime.now(),
                "This is a sample remark"
        );
        return Result.success();
    }
}
